#include <iostream>
#include <sstream>

using namespace std;

/**
 * A盒子：1-10整数
 * B盒子：0.1-1.0的浮点数
 * C盒子：小球，颜色有 maki eri umi 枚举类型
 *
 * 店主行为：清空一个盒子，在盒子中放入相应物品，修改盒子中的物品属性
 * 客户行为：猜测，盒子为空时返回false，非空且内容正确则正确
 *
 * 注意：盒子非空时放入物品的行为无效，修改属性的时候若盒子为空也无效，两个都忽略
 *
 * 备注：正确时输出 omedetou 错误时输入 zannen
 */

template <typename Type>
class Box {
   private:
    Type content;
    bool isEmpty{};

   public:
    Box() { this->isEmpty = true; }

    bool exists() { return !this->isEmpty; }

    void clear() { this->isEmpty = true; }

    void set(Type t) {
        this->content = t;
        this->isEmpty = false;
    }

    Type get() { return this->content; }
};

template <typename Type>
Type castString(const string& str) {
    istringstream iss(str);
    Type result;
    iss >> result;
    return result;
}

void guess(Box<int>& box, int property);

void guess(Box<float>& box, float property);

void guess(Box<string>& box, const string& property);

void put(Box<int>& box, int property);

void put(Box<float>& box, float property);

void put(Box<string>& box, const string& property);

void change(Box<int>& box, int property);

void change(Box<float>& box, float property);

void change(Box<string>& box, const string& property);

int main(int argc, char const* argv[]) {
    Box<int> BoxA;
    Box<float> BoxB;
    Box<string> BoxC;

    int role, option;
    char box;
    string property;

    int count;
    cin >> count;
    for (int i = 0; i < count; ++i) {
        cin >> role >> box >> option;
        if (role == 1) {
            if (option == 1) {
                if (box == 'A') {
                    BoxA.clear();
                } else if (box == 'B') {
                    BoxB.clear();
                } else if (box == 'C') {
                    BoxC.clear();
                }
            } else {
                cin >> property;

                if (option == 2) {
                    if (box == 'A') {
                        put(BoxA, castString<int>(property));
                    } else if (box == 'B') {
                        put(BoxB, castString<float>(property));
                    } else if (box == 'C') {
                        put(BoxC, property);
                    }
                } else if (option == 3) {
                    if (box == 'A') {
                        change(BoxA, castString<int>(property));
                    } else if (box == 'B') {
                        change(BoxB, castString<float>(property));
                    } else if (box == 'C') {
                        change(BoxC, property);
                    }
                }
            }
        } else if (role == 2) {
            // 顾客猜测的部分
            cin >> property;
            if (box == 'A') {
                guess(BoxA, castString<int>(property));
            } else if (box == 'B') {
                guess(BoxB, castString<float>(property));
            } else if (box == 'C') {
                guess(BoxC, property);
            }
        }
    }
    return 0;
}

void guess(Box<int>& box, int property) {
    if (box.exists()) {
        if (property == box.get()) {
            cout << "omedetou" << endl;
        } else {
            cout << "zannen" << endl;
        }
    } else {
        cout << "zannen" << endl;
    }
}

void guess(Box<float>& box, float property) {
    if (box.exists()) {
        if (property == box.get()) {
            cout << "omedetou" << endl;
        } else {
            cout << "zannen" << endl;
        }
    } else {
        cout << "zannen" << endl;
    }
}

void guess(Box<string>& box, const string& property) {
    if (box.exists()) {
        if (property == box.get()) {
            cout << "omedetou" << endl;
        } else {
            cout << "zannen" << endl;
        }
    } else {
        cout << "zannen" << endl;
    }
}

void put(Box<int>& box, int property) {
    if (box.exists()) {
        // 如果盒子非空
        return;
    } else {
        box.set(property);
    }
}

void put(Box<float>& box, float property) {
    if (box.exists()) {
        // 如果盒子非空
        return;
    } else {
        box.set(property);
    }
}

void put(Box<string>& box, const string& property) {
    if (box.exists()) {
        // 如果盒子非空
        return;
    } else {
        box.set(property);
    }
}

void change(Box<int>& box, int property) {
    if (box.exists()) {
        box.set(property);
    }
}

void change(Box<float>& box, float property) {
    if (box.exists()) {
        box.set(property);
    }
}

void change(Box<string>& box, const string& property) {
    if (box.exists()) {
        box.set(property);
    }
}